﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class InstancedColor : MonoBehaviour {
    
    private void Awake()
    {
        var mpb = new MaterialPropertyBlock();
        mpb.SetColor("_Color", new Color(UnityEngine.Random.Range(0f, 1f), UnityEngine.Random.Range(0f, 1f), UnityEngine.Random.Range(0f, 1f)));
        GetComponent<MeshRenderer>().SetPropertyBlock(mpb);
    }
}
